'''
Created on Nov 29, 2010

@author: dexen
'''

import time
import random

from dexen import BaseSlaveTask

from individual import Individual


class DevTask(BaseSlaveTask):
    def __init__(self):
        pass
    
    def __execute__(self, master_state, inds):
        print "I am in development"
        for ind in inds:
            assert isinstance(ind, Individual)
            phen = []
            for gene in ind.genotype:
                phen.append(int(gene*1000000+1))
            ind.phenotype = phen
            ind.archive_data("phenotype.txt", ind.phenotype)
            ind.archive_data("test.txt", "Hello World")
        return inds


